/*
 * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.inspur.edp.web.command.component;

/**
 * @author Kaixuan Shi
 * @version 0.1
 */
public final class ComponentConstant {

    //JSON结构版本
    public static final String CLASS_VERSION = "classVersion";
    public static final String EXTEND_PROPERTY = "extendProperty";
    public static final String WEB_COMMAND_NAME = "WebCommand";

    public static final class MetadataExtendPropertyField {
        public static final String FORM_CODE = "FormCode";
        public static final String IS_COMMON = "IsCommon";
    }

    public static final class ExtendPropertyField {
        public static final String FORM_CODE = "formCode";
        public static final String IS_COMMON = "isCommon";
    }

    public static final class WebCommandField {
        public static final String ITEMS = "items";
    }

    public static final class ParameterField {
        public static final String ID = "id";
        public static final String PARAM_TYPE = "paramType";
        public static final String IS_RET_VAL = "isRetVal";
        public static final String EDITOR_TYPE = "editorType";

    }

    public static final class CommandItemField {
        public static final String ITEM_TYPE = "itemType";
        public static final String ITEM_NAME = "itemName";
        public static final String ITEM_ID = "itemId";
    }

    public static final class BranchCollectionCommandItemField {
        public static final String ID = "id";
        public static final String CODE = "code";
        public static final String NAME = "name";
        public static final String ITEMS = "items";
    }

    public static final class BranchCommandItemField {
        public static final String ID = "id";
        public static final String CODE = "code";
        public static final String NAME = "name";
        public static final String CONDITION_TYPE = "conditionType";
        public static final String EXPRESS = "express";
        public static final String ITEMS = "items";
    }

    public static final class CmpMethodReferingField {
        public static final String ID = "id";
        public static final String CODE = "code";
        public static final String NAME = "name";
        public static final String COMPONENT_ID = "componentId";
        public static final String COMPONENT_CODE = "componentCode";
        public static final String COMPONENT_NAME = "componentName";
        public static final String COMPONENT_PATH = "componentPath";
        public static final String METHOD_ID = "methodId";
        public static final String METHOD_CODE = "methodCode";
        public static final String METHOD_NAME = "methodName";
        public static final String REPLACED = "replaced";
        public static final String BEFORE_EXPANSION = "beforeExpansion";
        public static final String AFTER_EXPANSION = "afterExpansion";
        public static final String PARAM_CONFIGS = "paramConfigs";
    }

    public static final class CmpMethodParamConfigField {
        public static final String PARAM_CODE = "paramCode";
        public static final String PARAM_NAME = "paramName";
        public static final String PARAM_EXPRESS = "paramExpress";
    }

    public static final class EditorInfoField {
        public static final String TYPE = "type";
        public static final String CONTEXT = "context";
    }

    public static final class EditorContextField {
        public static final String TYPE = "type";
        public static final String VALUE = "value";
    }

    //region 旧版数据字段
    public static final class OldComponentField {
        public static final String ID = "Id";
        public static final String CODE = "Code";
        public static final String NAME = "Name";
        public static final String DESCRIPTION = "Description";
        public static final String EXTENDS = "Extends";
        public static final String COMMANDS = "Commands";
        public static final String EXTEND_PROPERTY = "Extends";
    }

    public static final class OldCommandField {
        public static final String ID = "Id";
        public static final String CODE = "Code";
        public static final String NAME = "Name";
        public static final String DESCRIPTION = "Description";
        public static final String PARAMETERS = "Parameters";
        public static final String ITEMS = "Items";
    }

    public static final class OldParameterField {
        public static final String ID = "Id";
        public static final String CODE = "Code";
        public static final String NAME = "Name";
        public static final String DESCRIPTION = "Description";
        public static final String PARAM_TYPE = "ParameterType";
        public static final String IS_RET_VAL = "IsRetVal";
        public static final String EDITOR_TYPE = "EditorType";
        public static final String DEFAULT_VALUE = "defaultValue";
        public static final String CONTROL_SOURCE = "controlSource";
    }

    public static final class OldExtendPropertyField {
        public static final String FORM_CODE = "FormCode";
        public static final String IS_COMMON = "IsCommon";
    }

    public static final class OldCommandItemField {
        public static final String ITEM_TYPE = "itemType";
    }

    public static final class OldBranchCollectionCommandItemField {
        public static final String ID = "Id";
        public static final String CODE = "Code";
        public static final String NAME = "Name";
        public static final String ITEMS = "Items";
    }

    public static final class OldBranchCommandItemField {
        public static final String ID = "Id";
        public static final String CODE = "Code";
        public static final String NAME = "Name";
        public static final String CONDITION_TYPE = "ConditionType";
        public static final String EXPRESS = "Express";
        public static final String ITEMS = "Items";
    }

    public static final class OldCmpMethodReferingField {
        public static final String ID = "Id";
        public static final String CODE = "Code";
        public static final String NAME = "Name";
        public static final String COMPONENT_ID = "ComponentId";
        public static final String COMPONENT_CODE = "ComponentCode";
        public static final String COMPONENT_NAME = "ComponentName";
        public static final String COMPONENT_PATH = "ComponentPath";
        public static final String METHOD_ID = "MethodId";
        public static final String METHOD_CODE = "MethodCode";
        public static final String METHOD_NAME = "MethodName";
        public static final String REPLACED = "IsReplaced";
        public static final String BEFORE_EXPANSION = "IsBeforeExpansion";
        public static final String AFTER_EXPANSION = "IsAfterExpansion";
        public static final String PARAM_CONFIGS = "ParamConfigs";
    }

    public static final class OldCmpMethodParamConfigField {
        public static final String PARAM_CODE = "ParamCode";
        public static final String PARAM_NAME = "ParamName";
        public static final String PARAM_EXPRESS = "ParamExpress";
    }
    //endregion

}
